<template>
    <view class="bg-content">
        <seckillGoodsList ref="seckillGoodsListRef" :storeId="urlParams.storeId"></seckillGoodsList>
    </view>
</template>

<script>

    import seckillGoodsList from '@/components/seckill-goods-list.vue'

    export default {
        data() {
            return {}
        },
        components: {
            seckillGoodsList,
        },
        /**
         * 当页面导航时才会触发
         */
        onShow() {
            if (this.urlParams.seckillGoodsTitle) {
                // 设置首页标题
                uni.setNavigationBarTitle({
                    title: this.urlParams.seckillGoodsTitle
                });
            }
        },
        mounted() {
            const _self = this;
        },
        methods: {
            loadMore() {
                console.log(this.$refs.seckillGoodsListRef);
                if (this.$refs.seckillGoodsListRef.pagination.hasNextPage) {
                    this.$refs.seckillGoodsListRef.doInfinite();
                }
            }
        }
    }
</script>

<style lang="scss" scoped>
</style>
